package com.ruoyi.quartz.task;


import com.ruoyi.bus.service.IWitBusLocationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("clearBusLocationDataTask")
public class ClearBusLocationDataTask {

    private final static Logger logger = LoggerFactory.getLogger(ClearBusLocationDataTask.class);

    @Autowired
    private IWitBusLocationService witBusLocationService;

    /**
     * day为保留天数
     * @param day
     */
    public void clearBusLocationDataTask(Integer day){
        logger.info("start clear location data");
        witBusLocationService.deleteWitBusLocationByDays(day);
        logger.info("end clear location data");
    }
}
